package com.boco.biinjectionserviceapi.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @author: yichaofan
 * @date: 2019年05月09日 13:46
 * @email: hjljy@outlook.com
 * @version: v1.0
 * @description: 接收前端参数
 */
@Getter
@Setter
@NoArgsConstructor
@ApiModel(value = "参数接收对象", description = "前端参数user")
public class Params {

  @ApiModelProperty(value = "统计方式", name = "sumType", example = "createMonth")
  @NotBlank(message = "统计方式不能为空")
  private String sumType;

  @ApiModelProperty(value = "区域编码", name = "quYuCode", example = "313")
  private String quYuCode;

  @ApiModelProperty(value = "机构编码", name = "jiGouCode", example = "234")
  private String jiGouCode;

  @ApiModelProperty(value = "开始时间", name = "startTime", example = "2019-01-01")
  @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @NotNull(message = "起始时间不能为空")
  private Date startTime;

  @ApiModelProperty(value = "结束时间", name = "endTime", example = "2019-01-09")
  @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @NotNull(message = "结束时间不能为空")
  private Date endTime;



}
